The present invention relates to electronic circuits, and more specifically to a method and system for testing an oscillator circuit.
Oscillator circuits are an integral part of modern electronic circuits, especially microprocessor and microcontroller based circuits. An oscillator circuit, such as a PLL (Phase Locked Loop) circuit and a crystal oscillator circuit, is used to generate a clock signal, which is used to synchronize operations between various elements of an electronic circuit.
Crystal oscillator circuits are commonly used in the microprocessor and microcontroller based circuits for generating an oscillating signal. The microprocessor includes an on-chip circuit for generating a clock signal from the oscillating signal. Since, the circuit is on-chip, it may have some silicon faults that can hamper its operation, thereby producing a faulty clock signal. It is therefore essential to test the on-chip circuit to ensure generation of a correct clock signal.
Various testing techniques have been used to test the on-chip circuit. One test technique is to test the oscillation frequency with an external crystal having 100% fault coverage. In such case, the general start-up time is around 500 ms-600 ms for a crystal oscillator with a 32 kHz crystal. Thus, this technique has a long production test time. This technique also cannot be used to test the silicon die before it has been packaged.
Another test technique requires using external voltage sources and an ammeter to test the oscillator circuit. FIG. 1 is a schematic diagram of an ammeter based system 100 for testing an oscillator circuit. The system includes an on-chip inverter 102, which is connected between an EXTAL terminal 104 and an XTAL terminal 106. The system 100 also includes a first voltage source 108 connected to the EXTAL terminal 104 and a second voltage source 110 connected to an ammeter 112, which in-turn is connected to the XTAL terminal 106.
FIG. 2 is a flowchart 200 illustrating a method for testing the oscillator circuit with the system 100. The method includes two tests, the first test of which is shown in FIG. 2.
At step 202, a first voltage signal is applied from the second voltage source 110 at the XTAL terminal 106 and the EXTAL terminal 104 is grounded. The inverter 102 draws a current signal, corresponding to the first voltage signal, from the second voltage source 110. At step 204, the current drawn from the voltage source 110 is measured using the ammeter 112. At step 206, a check is performed to determine whether the magnitude of the measured current is within predefined limits. If the measured current is within the predefined limit, then at step 208 a pass status signal is generated; otherwise a fail status signal is generated at step 210.
Subsequent to the first test, a second test is performed in which the XTAL terminal 106 is grounded and a second voltage signal from the second voltage source 108 is applied at the EXTAL terminal 104. Then the method described above from steps 204 to 210 is repeated to detect silicon faults. In other words, the magnitude of the voltage signals generated by the first and second voltage sources 108, 110 are varied in order to cover all the silicon faults present in the oscillator circuit.
This conventional testing technique requires a long setup time to insure adequate test accuracy. Thus, the production test time is long and the fault coverage is relatively low. Further, use of external voltage sources and an external ammeter increases cost. Accordingly, there is need for a system for testing an oscillator circuit that has a low production test time and high fault coverage.